public class Offer10_1E {
    public int fib(int n) {
        if (n==0)return 0;
        if (n==1)return 1;
        final int MOD=1000000007;
        int x = 0;
        int y = 1;
        int z = 0;
        for (int i = 2; i <= n; i++) {
            z=(x+y)%MOD;
            x=y;
            y=z;
        }
        return z;
    }

    public static void main(String[] args) {
        new Offer10_1E().fib(50);
    }
}
